package branch;

public class While
{
    public static void main(String[] args)
    {
//        int year = test1();
//        System.out.println(year);
        System.out.println("需要折叠:"+ test2());

    }

    public static int test1()
    {
        double money = 100000;
        double rate = 1.017;
        int year = 0;
        while(money <200000)
        {
            money = money*rate;
            year++;
        }
        return year;

    }

    public static int test2()
    {
        double Height = 8848860;
        double paper = 0.1;
        int count = 0;
        while(paper<Height)
        {
            paper = paper*2;
            count++;
        }
        return count;
    }

}
